package com.ziyue.socket.bean.answer;

/**
 * Created by wancheng on 2019/4/19.
 */
public class RecordKey {

    private  String activityId;

    private String questionId;

    public RecordKey() {
    }

    public RecordKey(String activityId, String questionId) {
        this.activityId = activityId;
        this.questionId = questionId;
    }

    public String getActivityId() {
        return activityId;
    }

    public void setActivityId(String activityId) {
        this.activityId = activityId;
    }

    public String getQuestionId() {
        return questionId;
    }

    public void setQuestionId(String questionId) {
        this.questionId = questionId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        RecordKey recordKey = (RecordKey) o;

        String eqKey = activityId + questionId;

        return eqKey.equals(recordKey.getActivityId() + recordKey.questionId);

    }

    @Override
    public int hashCode() {
        String eqKey = activityId + questionId;
        return eqKey.hashCode();
    }
}
